import request from '@/utils/request'

// 查询文章列表
export function articleList(query) {
  return request({
    url: '/system/article/list',
    method: 'get',
    params: query
  })
}
// 新增文章
export function addarticle(data) {
  return request({
    url: '/system/article',
    method: 'post',
    data: data
  })
}


// 获取文章详细信息
export function articleId(id) {
  return request({
    url: `/system/article/${id}`,
    method: 'get',
  })
}


// 修改文章
export function eitHarticle(data) {
  return request({
    url: '/system/article',
    method: 'put',
    data: data
  })
}

// 删除文章
export function delarticle(id) {
  return request({
    url: `/system/article/${id}`,
    method: 'delete'
  })
}

// 导出品类列表
export function exporTarticle(data) {
  return request({
    url: '/system/article/export',
    method: 'post',
    data: data
  })
}

// 审核文章
export function articleAudit(query) {
  return request({
    url: '/system/article/audit',
    method: 'get',
    params: query
  })
}